<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>商品详情页</title>
		<link rel="stylesheet" type="text/css" href="Public/Home/css/detail.css"/>
		<!-- <link rel="stylesheet" type="text/css" href="Public/Home/css/chearfix_box.css"/> -->
		<link rel="shortcut icon" href="http://www.vmall.com/favicon.ico">
		<link href="Public/Home/css/ec.css" rel="stylesheet" type="text/css">
		<script src="Public/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/js/detail.js" type="text/javascript" charset="utf-8"></script>
		<!-- <script src="Public/Home/js/clearfix_box.js" type="text/javascript" charset="utf-8"></script> -->
		<script src="Public/Home/js/detail_mid.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/js/getTop.js" type="text/javascript" charset="utf-8"></script>

		<!--引用的放大镜 -->
		<link href="Public/Home/fangdajing/css/fangdajing.css" rel="stylesheet" type="text/css" />
		<!-- <script type="text/javascript" src="Public/Home/fangdajing/js/jquery-1.4.2.min.js"></script> -->
		<script type="text/javascript" src="Public/Home/fangdajing/js/fangdaji1.js"></script>
		<script type="text/javascript" src="Public/Home/fangdajing/js/fangdajng.js"></script>



	<!-- 后盾js的引入 -->
			<link rel="stylesheet" href="Public/Home/Common/hdjs/hdjs.css">
			<script src="Public/Home/Common/hdjs/hdjs.min.js"></script>
	</head>
	<body class="wide detail">
		
		<!--公共的头部-->
		<!-- 引入公共头部 -->
		{{include file="../Common/header"}}
		
		
		
		<!--公共的头部结束-->
		
		
		
		
		<!--商品坐标-->
		<div id="pos">
		<a href="{{U('Index/index')}}">首页	</a>&rArr;
		{{foreach from="$brandData" key="$k" value="$v"}}
			{{if value="$k neq (count($brandData)-1)"}} 
				<a href="{{U('List/index',['cid'=>$v['cid']])}}">{{$v['cname']}} </a> &rArr;
			{{else}} 
				<span>{{$v['gname']}}</span>
			{{endif}}
		{{endforeach}}
		</div>
		<!--商品坐标结束-->
		<!--商品图片展示区域-->
	<div id="goods-show">

	<!-- 放大镜引用 -->
	<!--第一次打开的图-->
	<div style="border-right:1px solid #DEDEDE;width:543px;height:642px;float:left">
		<div id="preview" class="spec-preview">
			<span class="jqzoom">
					<img jqimg="{{$detailData['big'][0]}}" src="{{$detailData['middle'][0]}}" style="width:480px;height:480px;" />
			</span> 
		</div>
		<!--网页第一次打开的图片-->
		<!--缩图开始-->
		<!--左右箭头-->
		<div class="spec-scroll"> <a class="prev">&lt;</a> <a class="next">&gt;</a>
		<!--左右箭头-->
		  <div class="items">
		    <ul>
		    	<!--bimg是大图片-->
		    	<!--src是小图片-->
		    	{{foreach  from="$detailData['big']" key="$k" value="$v"}}
		     	   <li><img alt="佳能" bimg="{{$v}}" src="{{$detailData['middle'][$k]}}" onmousemove="preview(this);"></li>
		      	{{endforeach}}
		
		    </ul>
		  </div>
		</div>
	</div>
		<!--缩图结束-->
		<!-- 放大镜引用结束 -->
		

			<div class="right">
				<!--商品标题-->
				<h1  class="right_h1">{{$goodsData['gname']}} <span style="font-size:15px">{{$goodsData['desc']}}</span></h1>
				<!--商品标题结束-->
				<!--商品详细介绍也-->
				<ul class="mid">
					<li>华 为  价: <span class="money_goods">¥<span class="mm_money">{{$goodsData['shopprice']}}.00</span></span></li>
					<input type="hidden" id="shopprice" value="{{$goodsData['shopprice']}}">
					<li>商品编码: <span>{{$goodsData['gnumber']}}</span></li>
					<li>商品评分: <span><span style="color:red">&hearts;&hearts;&hearts;&hearts;&hearts;&hearts;</span>（共 {{$goodsData['click']}} 条评论）</span></li>
					<li>运      费: <span>满 99 免运费</span></li>
					<li>服      务: <span>由华为商城负责发货，并提供售后服务</span></li>
				</ul>
				<!--商品详细介绍页结束-->
				<!--用户选择-->
				<script type="text/javascript">	
					$(function(){
						$('.bot li a').click(function(){
							var liLength=$('.bot li').length-1;
							var redLength=$('.icon').length;
							var gid=$('#inputGid').attr('value');
							if(liLength==redLength){
								var str='';
								$('.icon').each(function(){
									// 处理用的方法的话，就要用$(this)
									str+=$(this).attr('specId')+',';
								});
								// alert(str);
								$.ajax({
								   type: "POST",
								   url: "{{U('Detail/getAjax')}}",
								   // 传递变量加{}
								   data: {str,gid},
								   dataType:"json",
								   success: function(phpData){
								     if(phpData){
								     	var price=phpData.price+'.00';
								     	var inventory=phpData.inventory;
								     	$('.mm_money').html(price);
								     	$('#shopprice').val(price);
								     	var ps=$('.youChose').html();
								     	ps=ps+'库存:'+inventory+'件';
								     	$('.youChose').html(ps);
								     	$('#vam').attr('value',1);
								     	$('#inputGlid').val(phpData.glid);								     	
								     	return;
								     	// alert(price);
								     }
								     	$('.mm_money').html('0.00');
								     	$('#vam').attr('value','0');
								     	$('.youChose').html('不要意思，您搜索的宝贝已无,请更换宝贝');
								     	return;
								   }
								});
							}
						});


					})
				</script>	

				<ul class="bot"   style="position:relative;"> 
				<input id="inputGid" type="hidden"   value="{{$goodsData['gid']}}"  gname="{{$goodsData['gname']}}">
				<input   id="inputGlid" type="hidden"  value="">
				{{foreach from="$tempAttrData" key="$k" value="$v"}}
					<li>
						<span >{{$k}}:</span>
						{{foreach from="$v" key="$kk" value="$vv"}}
						<a href="javascript:;"   specId="{{$vv['gtid']}}">{{$vv['gtvalue']}}</a>
						{{endforeach}}
					</li>
				{{endforeach}}
				
					<!--  <li>
						<span>选择颜色:</span>
						<a href="#" class="icon">珍珠白</a>
						<a href="#">珍珠什么白</a>
					</li> -->
					
					<li>
						<span style="float: left;">购买数量:</span>
						<span href="#" id="downTo">-</span>
						<input type="text" name="vam" id="vam"  disabled="true" value="0" />
						<span href="#" id="upTo">+</a>
					</li>
		
					<div id="chose">
						<b>你选择了:</b><span class="youChose" >&hearts;&hearts;&hearts;&hearts;&hearts;&hearts;</span>
					</div>





					<!-- 点击购物车的ajax程序 -->
					<script>
						$(function(){
							$('#gwc').click(function(){
								var value=$('#vam').val();
								if(value==0){
									$('#tixing').fadeIn('fast');
									setTimeout(function(){
										$('#tixing').fadeOut('slow');
									},1000);
								}else{

									$('#gwcxf').show();

									var id=$('#inputGlid').val();
									var name=$('#inputGid').attr('gname');
									var num=$('#vam').val();
									var price=$('.mm_money').html();
									var color='red';
									var size='L';
									
									$('#gwc_b_one').html(num);
									$('#gwc_b_two').html("￥&nbsp"+price);

									var gid=$('#inputGid').val();
									var str='';
									$('.icon').each(function(){
										// 处理用的方法的话，就要用$(this)
										str+=$(this).attr('specId')+',';
									});
								
									var option=gid;
									$.ajax({
									   type: "POST",
									   url: "{{U('Detail/gwcAjax')}}",
									   data: {id,name,num,price,option,color,size},
									   dataType:'json',
									   success: function(phpData){
									    	
									   }
									});

								}


							})




						})	
					</script>


					<div id="doIt">
						<button  class="putCar same"  id="gwc" style="cursor:pointer">加入购物车</button>
						<?php  if(isset($_SESSION['info'])){?>
						<button href="javascript:;" class="buyNow same"  i='1' style="cursor:pointer">立即下单</button>
						<?php }else{?>
						<button href="javascript:;" class="buyNow same" i='0' style="cursor:pointer">立即下单</button>
						<?php }?>

						<!-- 点击立即下单的js程序 -->
						<script>
						$(function(){
							$('.buyNow').click(function(){
								var i=$(this).attr('i');
								if(i==0){
									hd_alert({message:'请先去登录，谢谢'});
								}else{
									hd_alert({message:'谢谢您的支持'});
								}


							})



						})


						</script>

							<!-- 点击购物车的时候有跳出的框 -->
						<div id="gwcxf"  style="position:absolute; z-index: 999; width:500px;height:200px;background-color:#F2F2F2; margin:30px;bottom:50px;display:none">
						
					
							<div style="position:relative;"><span style="font-size:20px;position:absolute;right:5px;cursor:pointer"  onclick="$('#gwcxf').hide()">&times;</span></div>
							<center>
								<div style="margin:20px">
									<p style="margin:20px"  class="gwc_p_one">{{$goodsData['gname']}}</p>
									<p class="" style="color:#7ABD54;font-size:20px;margin:20px">成功加入购物车!</p>
									<p class="" style="margin:20px">购物车中共&nbsp;<b id="gwc_b_one">0</b>&nbsp;件商品，金额合计&nbsp;<b  id="gwc_b_two">¥&nbsp;0</b></p>
									<p class="" style="margin:20px">
									<span href="javascript:;" class=""  style="display: inline-block; width:100px;height:30px;background-color:#E01D20;text-align:center;line-height:30px;font-size:15px;color:white;cursor:pointer"  onclick="window.location.href='{{U('Gwc/carOne')}}'">去结算</span>
									<span class="" href="javascript:;"  style="display: inline-block; width:100px;height:30px;background-color:#009323;text-align:center;line-height:30px;font-size:15px;color:white;cursor:pointer;margin-left:10px" onclick="$('#gwcxf').hide()">继续逛逛</span>
									</p>			
								</div>
							</center>

							
						</div>	
						

						<div id="tixing"  style="position:absolute; z-index: 999; width:500px;height:200px;background-color:#F2F2F2; margin:30px;bottom:50px; display:none">
							<center>
								<p  style="margin-top:20px;margin-bottom: 10px; font-size:20px;color:#ED8187">&diams;&diams;&diams;&diams;&diams;请添加有效商品
								</p>
								<img src="Public/Home/images/a12.gif" style="width:200px;" alt="">
								
							</center>
						</div>

					</div>
				
				</ul>
				<!-- 用户选择结束 -->
				<form action=""></form>
			
			</div>
		</div>
		<!--商品图片展示区域结束
	推荐搭配-->
		<div id="suggest">
			
		</div>
		<!--推荐搭配结束-->
		<!--用户留言区域-->
		<div id="custorm_suggest">
			<!--热销榜单-->
			<div class="left_hot">
				<div  style="border:1px solid #DEDEDE">热销榜单</div>
				{{foreach from="$hotGoodsData" key="$k" value="$v" }}
					<li>
						<a href="{{U('Detail/index',['gid'=>$v['gid']])}}" class="small_img"><img src="{{$v['pic']}}"/></a>
						<a href="{{U('Detail/index',['gid'=>$v['gid']])}}" class="goods">{{$v['gname']}} <span style="color:red">请点击购买，物超所值</span></a>
						<div class="top top_small_img_{{$k+1}}"></div>
						<span class="money">¥{{$v['shopprice']}}</span>
					</li>
				
				{{endforeach}}
				
				<!--最近浏览过的商品-->
				<?php  if(isset($historyData)){ ?>
				<ul class="user_looks">
					<li class="time_looks">
						最近浏览过的商品
						<span class="user_looks_del"></span>
					</li>
					
					{{foreach from="$historyData" value="$v"}}
						<div class="box">
							<li class="user_looks_img">
								<img src="{{$v['pic']}}"/>
							</li>
							<li class="user_looks_title">
								<a href="{{U('Detail/index',['gid'=>$v['gid']])}}">{{$v['gname']}} 显然，是想买我嘛</a>
							</li>
							<li class="user_looks_money">
								¥{{$v['shopprice']}}
							</li>
						</div>
					{{endforeach}}
				</ul>
				<?php  }?>
				<!--最近浏览过的商品结束-->
				
			</div>
			<!--热销榜单结束-->
			<ul class="goods_user">
				<div class="fix_box">
					<li>
						<span class="active">商品详情</span>
						<span>用户评价</span>
						<span>规格参数</span>
						<span>售后服务</span>
					</li>
				</div>
				<div class="big_box" >
						<div class="hide_box">
							<center>{{$detailData['intro']}}</center>	
						</div>

						<div class="hide_box">
										<!-- 多说评论框 start -->
									<div class="ds-thread" data-thread-key="{{$goodsData['gid']}}" data-title="{{$goodsData['gname']}}" data-url="{{U('Detail/index',['gid'=>$goodsData['gid']])}}"></div>
								<!-- 多说评论框 end -->
								<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
								<script type="text/javascript">
								var duoshuoQuery = {short_name:"hwsc"};
									(function() {
										var ds = document.createElement('script');
										ds.type = 'text/javascript';ds.async = true;
										ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
										ds.charset = 'UTF-8';
										(document.getElementsByTagName('head')[0] 
										 || document.getElementsByTagName('body')[0]).appendChild(ds);
									})();
									</script>
									<!-- 多说公共JS代码 end -->
						</div>

						<div class="hide_box">
							
						</div>

						<div class="hide_box">
							<div style="margin:50px">
								{{$detailData['service']}}
							</div>
						<!-- 多说评论框 start -->
							<div class="ds-thread" data-thread-key="{{$goodsData['gid']}}" data-title="{{$goodsData['gname']}}" data-url="{{U('Detail/index',['gid'=>$goodsData['gid']])}}">
							</div>
						<!-- 多说评论框 end -->
	
						</div>
				</div>
			</ul>
		</div>
		<!--用户留言区域结束-->
		
		
		
		<!--公共的底部-->
		
		<footer class="footer">
    <!-- 20130902-底部-友情链接-start -->
	<div class="footer-otherLink">

	</div>
	
	<div class="footer-warrant-area">
		<p>
			<a textvalue="隐私政策" title="隐私政策" target="_blank" href="http://www.vmall.com/help/faq-2635.html">隐私政策</a>  
			<a title="服务协议" target="_blank" href="">服务协议</a>       
			 Copyright © 2012-2016  ********   版权所有  保留一切权利
		</p>
		<p>
			<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=32011402010009">
				<img style="width:20px;height:20px;float:none;" src="Public/Home/images/jingcha.png" title="公安备案" border="0" height="20" hspace="0" vspace="0" width="20">
				<span style="font-size:15px;font-family:宋体">
					<span style="font-size:12px;font-family:arial,helvetica,sans-serif;"> ******</span>
					<span style="font-size:12px;font-family:arial,helvetica,sans-serif;"> 32011402010009号</span>
				</span>
			</a> | 
			<a target="_blank" href="http://www.miitbeian.gov.cn/">******09062682号-9</a> | ******：苏B2-20130048 | 
			<a target="_blank" href="http://res.vmallres.com/certificate/wwwz.jpg">******许可证：苏网文[2012]0401-019号</a>
		</p>
		<p><br>
		<!-- <a target="_blank" href="http://res.vmallres.com/certificate/wwwz.jpg"></a> -->
		</p>
		<p>
			
		</p>
	</div><!--授权结束 -->
</footer>
		
		
		
		<!--公共的底部结束-->
		
		
		
		
		
	</body>
</html>





























